﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Entity
{
    public class Address
    {
        /// <summary>
        /// 地址ID
        /// </summary>
        [Key]
        [Required]

        public int address_id { get; set; }

        /// <summary>
        /// ⽤户ID
        /// </summary>
        [Required]
        public int user_id { get; set; }

        /// <summary>
        /// 收货⼈姓名
        /// </summary>
        [Required]
        [StringLength(32)]
        public string? receiver { get; set; }

        /// <summary>
        /// 省份
        /// </summary>
        [Required]
        [StringLength(20)]
        public string? province { get; set; }

        /// <summary>
        /// 城市
        /// </summary>
        [Required]
        [StringLength(20)]
        public string? city { get; set; }

        /// <summary>
        /// 是否默认地址（0否/1是）
        /// </summary>
        [Required]
        public int is_default { get; set; }


    }
}
